<?php
namespace App\Handlers;

use GuzzleHttp\Client;

class GetImagesUrlHandler {

    public function get($num = 1)
    {
        $http = new Client;
        if ($num > 1) $num_str = '/' . $num;
        else $num_str = '';
        $response = $http->request('GET', 'https://www.touxiangge.com/images/rand_url' . $num_str);
        return $response->getBody()->getContents();
    }
    public function dongman()
    {
        $http = new Client;
        $response = $http->request('GET', 'https://www.touxiangge.com/images/dongman');
        return $response->getBody()->getContents();
    }
}
